
//退出队伍

// @ts-ignore
export async function execute(client_id,message_json) {
    let login_characters = G.Characters.get_current_login_characters(client_id);
    let team_data = G.TeamUtils.get_team_data(login_characters["队伍"]);
    if (team_data === undefined) {
        ClientUtils.send_basic_prompt(client_id, "队伍不存在");
        if (login_characters["队伍"] !== 0) {
            login_characters["队伍"] = 0;
            login_characters["队长"] = false;
        }
        return;
    }
    if (G.TeamUtils.remove_team_characters(login_characters["队伍"], login_characters["id"])) {
        ClientUtils.send_basic_prompt(client_id, "你已退出队伍");
        ClientUtils.send_client_message(client_id, 4004, {});
    };
}
